<?php
declare (strict_types=1);

namespace app\model;

use think\Model;

/**
 * @mixin \think\Model
 */
class Index extends Model
{
    protected $table = "day_user";

//    查询数据
    public static function selectData($openid)
    {
        return self::where('openid', $openid)->find();
    }

//    添加数据
    public static function addData($data)
    {
        return self::create($data);
    }

    //    修改数据
    public static function changeData($openid, $data)
    {
        return self::where("openid", $openid)->save($data);
    }
}
